﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using Autofac;
using IocWcfService.Domain.Provider;
using IocWcfService.Impl.Test;
using IocWcfService.IServices.Test;
using IocWcfService.Services.Test;

namespace IocWcfService.Host
{
    public static class AutofacContainerBuilder
    {
        public static IContainer BuildContainer()
        {
            var builder = new ContainerBuilder();
            try
            {
                //builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly());
                builder.RegisterType<EuropeanTestProvider>().As<ITestProvider>();
                builder.RegisterType<TestProviderService>().As<ITestProviderService>();
            }
            catch (Exception ex)
            {
                throw ex;
            }      
           

            return builder.Build();
        }
    }
}